<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul>
        <li class="woman">小红</li>
        <li class="man">小明</li>
        <li class="man">小强</li>
        <li class="woman">小兰</li>
    </ul>
</body>
</html>
<script>
    var women=document.getElementsByClassName('woman');
    var men=document.getElementsByClassName('man');
    console.log(women[0]);
    console.log(men[0]);
</script>